/*******************************************************************
*
*    DESCRIPTION:head.h,this file include kinds of header file
*				 such as libxml,libipq,libgtk 
*
*    AUTHOR:LiuHui
*
*    HISTORY:
*
*    DATE:8/21/2006
*
*******************************************************************/
#ifndef HEADER_H
#define HEADER_H
//c run-time library
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <dirent.h>
//gui
#include <glade/glade.h>
#include <gtk/gtk.h>
//xml
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
//pthread
#include <pthread.h>
//network including libipq
#include <linux/netfilter.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <netinet/tcp.h>
#include <libipq/libipq.h>
#include <netinet/in.h>
#include<sys/types.h>
//struct 
struct AppEntry
{
	int seqnum;
	int allow;
	char *name;
	int tcplink_counter;//we the app fist to output,we should check listening port.so we add this counter
};

struct ServiceEntry
{
	int seqnum;
	int allow;
	int sport;
	char *name;
};
struct DportEntry
{
	int dport;
	int counter;
	int protocol;
};
//global variable
extern GladeXML *gui_xml; 
extern xmlDocPtr conf_xml;
extern struct AppEntry app_conf[];
extern struct ServiceEntry service_conf[];
extern int app_counter;
extern int service_counter;
extern int xml_app_counter;
extern struct ipq_handle *h;
#endif
